package com.beehoo.dcportal.dao;

import java.util.List;

import com.beehoo.dcportal.common.base.BaseException;
import com.beehoo.dcportal.model.MessageBean;

public interface IMessageDao {
	//信息状态
	public static enum MsgStatus { 
		SAVED(0), UNAUDITED(1), REJECTED(2), PUBLISHED(3);
		
		private int val;
		private MsgStatus(int i){
			val = i;
		}
		
		public String val(){
			return String.valueOf(val);
		}
	};

	//圖片
	public static enum CoverType { 
		YES(0), NONE(1), ALL(2);
		
		private int val;
		private CoverType(int i){
			val = i;
		}
		
		public String val(){
			return String.valueOf(val);
		}
	};
	/**
	 * 获取信息列表
	 * @param streetId
	 * @param msgType
	 * @param msgState
	 * @param iPageNo
	 * @param iRows
	 * @return
	 * @throws BaseException
	 */
	public List<MessageBean> getMessageList(String streetId, String msgType, MsgStatus msgState, CoverType coverType, int iPageNo, int iRows) throws BaseException;
        
        /**
	 * 获取信息列表
	 * @param streetId
	 * @param msgType
	 * @param msgState
	 * @param iPageNo
	 * @param iRows
	 * @return
	 * @throws BaseException
	 */
	public List<MessageBean> getPortletMessageList(String streetId, String msgType, MsgStatus msgState, CoverType coverType, int iPageNo, int iRows) throws BaseException;
	
	/**
	 * 获取信息总数
	 * @param streetId
	 * @param msgType
	 * @param msgState
	 * @return
	 * @throws BaseException
	 */
	public int getMessageCount(String streetId, String msgType, MsgStatus msgState, CoverType coverType) throws BaseException;
	
	/**
	 * 获取信息详细
	 * @param streetId
	 * @param msgId
	 * @return
	 * @throws BaseException
	 */
	public MessageBean getMessageItem(String streetId, String msgId) throws BaseException;
	
}
